#ifndef __CYBERPAY_H
#define __CYBERPAY_H

#include <string>
#include <unistd.h>
#include <sys/types.h>
#include "setup_cyberplat_pgsql.h"
#include "receipt.h"

using namespace std;

#define ASUCCESS		0

#define AERR_INTERNAL_DB -16
#define AERR_INTERNAL_IDX -17
#define AERR_INTERNAL_OP -18

class Cyberpay
{
protected:
	SetupCyberplat *cyberplat_db;

    string proxy;
    string SSL;
    string keys;
    string pass;
    string bankey;
    string ap;
    string op;
    string sd;
    int timeout;

public:
    Cyberpay(void);
    virtual ~Cyberpay(void);

    int Pay(Receipt *rec, int record);
    int Check(Receipt *rec, int record);
};

#endif
